package command.receiver;

/**
 * 接收者：电视，知道如何执行业务操作
 *
 * @author Liu Yicong
 * @date 2025/9/25
 */
public class TV {
	private boolean isOn;

	public TV(boolean isOn) {
		this.isOn = isOn;
	}

	public void turnOn() {
		this.isOn = true;
		System.out.println("📺 电视开启。");
	}

	public void turnOff() {
		if (this.isOn) {
			System.out.println("📺 电视关闭。");
		} else {
			System.out.println("📺 电视未开启。");
		}
	}

	public void volDown() {
		System.out.println("电视音量降低📺🔊⬇️");
	}

	public void volUp() {
		System.out.println("电视音量提高📺🔊⬆️");
	}

	public boolean isOn() {
		return isOn;
	}

	public void setOn(boolean on) {
		isOn = on;
	}
}
